import service from "@/api/index.js";
const taskApi = {
    get(){
        return service.get('/job/query').then(resp=>resp.data)
    },
    edit(editTask){
        return service.put('/job/reschedule',editTask).then(resp=>resp.data)
    },
    delete(task){
        return service.post('/job/delete',task).then(resp=>resp.data)
    },
    resume(task){
        return service.post('/job/resume',task).then(resp=>resp.data)
    },
    pause(task){
        return service.post('/job/pause',task).then(resp=>resp.data)
    },
    add(task){
        return service.post('/job/add',task).then(resp=>resp.data)
    }
}
export default taskApi